package com.superquan.selfstudybootmybatis.controller;
import com.superquan.selfstudybootmybatis.service.SmsService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @author zwq
 * @description 阿里云发送短信
 * @date 2022/3/29
 */
@RestController
@RequestMapping(value = "/sms")
public class SmsController {
    @Resource
    private SmsService smsService;

    /**
     * 发送短信
     * @param phone
     * @return
     */
    @PostMapping(value = "/sendMessage")
    public Map<String, Object> smsXxs(String phone) {
        return smsService.sendMsg(phone);
    }
}
